package com.shakespace.artofandroid.chapter01.launchmode

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.shakespace.artofandroid.R
import kotlinx.android.synthetic.main.activity_e.*

class EActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_e)

        tv_B.setOnClickListener {
//            start(BActivity::class.java)
            val intent = Intent(this, BActivity::class.java)
            intent.flags = Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
            startActivity(intent)
        }
    }
}
